using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;

namespace DatabaseManager.AccessDatabase
{
	class AccessDatabaseRecordSet : RecordSetObjectBase
	{
		#region Fileds
		OleDbDataReader dataReader;
		int objectID;
		#endregion

		#region Properties
		public OleDbDataReader DataReader
		{
			get { return dataReader; }
			set { dataReader = value; }
		}

		public override int ObjectID
		{
			get
			{
				return this.objectID;
			}
			set
			{
				this.objectID = value;
			}
		}
		#endregion

		#region Constructors
		public AccessDatabaseRecordSet()
		{
		}
		#endregion

		#region overrides
		public override void ReadNext()
		{
			this.DataReader.Read();
		}

		public override object GetValue(string columnName)
		{
			return this.DataReader[columnName];
		}

		public override object GetValue(int index)
		{
			return this.DataReader[index];
		}

		public override void Clear()
		{
			this.DataReader.Close();
		}
		#endregion
	}
}